#pragma once
#include"usart.h"
#include"iremote_proxy.h"
namespace OHOS {
namespace Usart_Standard{

class UsartAbilityProxy : public IRemoteProxy<IUsartAbility> {
public:
    virtual int open(const std::string& name);
	virtual int close(const std::string& name);
	virtual bool is_open(const std::string& name);

    virtual int write(const std::string& name,const std::string& data);

	virtual std::string read(const std::string& name,size_t bytes);

	virtual std::string readline(const std::string& name);

    virtual void begin_read_loop(const std::string& name);
	virtual void end_read_loop(const std::string& name);
	virtual std::string read_from_looper(const std::string& name);

    explicit UsartAbilityProxy(const sptr<IRemoteObject>& impl)
        : IRemoteProxy<IUsartAbility>(impl) { }

private:
    static inline BrokerDelegator<UsartAbilityProxy> delegator_;
};
}//namespace Usart_Standard
} // namespace OHOS